package fi.bluepill.server.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import java.util.HashSet;
import java.util.Set;

@Entity
public abstract class CommentableEntity extends AbstractEntity {
    @OneToMany(fetch = FetchType.LAZY)
    private Set<Comment> comments = new HashSet<Comment>();

    public Set<Comment> getComments() {
        return comments;
    }
}
